path = "/etc/environment"
text = "GTK_IM_MODULE=fcitx"
with open(path, "r") as file:
    content = file.read()
    if text in content:
        pass
    else:
        with open(path, "a") as file:
            file.write(
                "\nQT_IM_MODULE=fcitx\nXMODIFIERS=@im=fcitx\nSDL_IM_MODULE=fcitx\nGLFW_IM_MODULE=ibus"
            )

# \nGTK_IM_MODULE=fcitx
